<?php
function AutomaticDiscountPrice($ID_user)
{
//************************autoimaticke zlavy**********************************************	        
	$sql_psel= "SELECT Price_automatic FROM discount_automatic WHERE ID_user =".$ID_user;
	if(mysql_num_rows(mysql_query($sql_psel))!=0)					
	{
		$sql_array_Prodct_automatic = mysql_fetch_object(mysql_query($sql_psel));
		return $sql_array_Prodct_automatic->Price_automatic;
	}else
		return 0;
	
//************************autoimaticke zlavy**********************************************
}
function ActualOrderSumm($ID_user)
{
//************************autoimaticke zlavy**********************************************	        
	$sql_psel= "SELECT Top_price FROM top_user WHERE (ID_top=".$ID_user.")";
		if(mysql_num_rows(mysql_query($sql_psel))!=0)					
		{
	    	$sql_array_Prodct = mysql_fetch_object(mysql_query($sql_psel));
	    	return $sql_array_Prodct->Top_price;
	    }
	    else
	    	return 0;
	
//************************autoimaticke zlavy**********************************************
}
?>